home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Toolbar3.pxl < prev    next >
Text File  |  2000-12-23  |  3KB  |  126 lines

  1.     UseCoordinates(PIXEL)
  2.     UseBackGround(TRANSPARENT,192,192,192)
  3.     WinGetActive(Win$)
  4.     Set Caption$ = "Bar#3"
  5.  
  6.     {one instance only}
  7.     WinExist(Caption$,Res)
  8.     If Res = 0 Then Goto One_Instance
  9.         WinSetActive(Caption$,Res)
  10.         End    
  11.     {endif}
  12.  
  13. One_Instance:
  14.     InfoMenu(REMOVE)
  15.     WaitInput(100)
  16.     SetMenu()
  17.     DirGet(SourceDir$)
  18.     WinTitle(Win$,Caption$)
  19.     WinVersion(Major,Minor,Build,Pack$)
  20.     If Major = 4
  21.         WinLocate(Caption$,550,55,728,153,Res)
  22.     Else
  23.         WinLocate(Caption$,550,55,720,145,Res)
  24.     Endif
  25.  
  26.     WinShow(Caption$,TOPMOST,Res)    
  27.     Set Icnname1$ = SourceDir$ + "\btn1.bmp"
  28.     Set Icnname2$ = SourceDir$ + "\btn2.bmp"
  29.     Set Icnname3$ = SourceDir$ + "\btn3.bmp"
  30.     Set Icnname4$ = SourceDir$ + "\btn4.bmp"
  31.     Set Icnname5$ = SourceDir$ + "\btn5.bmp"
  32.     Set Icnname6$ = SourceDir$ + "\btn6.bmp"
  33.     Set Icnname7$ = SourceDir$ + "\btn7.bmp"
  34.     Set Icnname8$ = SourceDir$ + "\btn8.bmp"
  35.     Set Icnname9$ = SourceDir$ + "\btn9.bmp"
  36.     Set Icnnameh$ = SourceDir$ + "\btnh.bmp"
  37.     Set IcnnameT$ = SourceDir$ + "\pxltools.bmp"
  38.     GoSub DrawButtons
  39.     
  40. Wait_for_Input:
  41.     DrawBitmap(1,1,IcnnameT$)
  42.     WaitInput()
  43.  
  44.  
  45. Close:
  46.     End
  47.  
  48.  
  49. Btn_01:
  50.     DrawBitmap(1,1,Icnname1$)
  51.     WaitInput(200)
  52.     Goto Wait_for_Input
  53. Btn_02:
  54.     DrawBitmap(34,1,Icnname2$)
  55.     WaitInput(200)
  56.  
  57.     Goto Wait_for_Input
  58. Btn_03:
  59.     DrawBitmap(67,1,Icnname3$)
  60.     WaitInput(200)
  61.  
  62.     Goto Wait_for_Input
  63. Btn_04:
  64.     DrawBitmap(100,1,Icnname4$)
  65.     WaitInput(200)
  66.  
  67.     Goto Wait_for_Input
  68.  
  69. Btn_05:
  70.     DrawBitmap(133,1,Icnname5$)
  71.     WaitInput(200)
  72.  
  73.     Goto Wait_for_Input
  74.  
  75. Btn_06:
  76.     DrawBitmap(1,34,Icnname6$)
  77.     WaitInput(200)
  78.  
  79.     Goto Wait_for_Input
  80. Btn_07:
  81.     DrawBitmap(34,34,Icnname7$)
  82.     WaitInput(200)
  83.  
  84.     Goto Wait_for_Input
  85. Btn_08:
  86.     DrawBitmap(67,34,Icnname8$)
  87.     WaitInput(200)
  88.  
  89.     Goto Wait_for_Input
  90. Btn_09:
  91.     DrawBitmap(100,34,Icnname9$)
  92.     WaitInput(200)
  93.  
  94.     Goto Wait_for_Input
  95.  
  96. Btn_10:
  97.     DrawBitmap(133,34,Icnnameh$)
  98.     WaitInput(200)
  99.     MessageBox(OK,1,EXCLAMATION,
  100. "The buttons on this floating toolbar were created using
  101. a series of 16 color bitmaps, and set to TOPMOST. Only 
  102. the left mouse is enabled in this example, and the buttons
  103. have been programmed just to click in and out. These buttons
  104. can be programmed to start any other application.
  105.  
  106. To close this window, use Alt-F4.",
  107.     "Floating toolbars with bitmapped buttons",Res)
  108.  
  109.     Goto Wait_for_Input
  110.  
  111.  
  112. DrawButtons: {Subroutine}
  113.     SetMouse( 1,1,32,32,Btn_01,X,Y, 
  114.          34,1,65,32,Btn_02,X,Y,
  115.          67,1,98,32,Btn_03,X,Y,
  116.          100,1,131,32,Btn_04,X,Y,
  117.           133,1,164,32,Btn_05,X,Y,
  118.           1,34, 32,66,Btn_06,X,Y,
  119.          34,34, 65,66,Btn_07,X,Y,
  120.          67,34, 98,66,Btn_08,X,Y,
  121.          100,34,131,66,Btn_09,X,Y,
  122.         133,34,164,66,Btn_10,X,Y)
  123.     Return
  124.  
  125.  
  126.